home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DomonicDefence4.swf / scripts / DefineButton2_1388 / BUTTONCONDACTION on(release).as next >
Encoding:
Text File  |  2005-09-27  |  1.9 KB  |  77 lines

  1. on(release){
  2.    _root.buyMenu.messyHah.sawMessage = false;
  3.    if(_root.modeo == "All")
  4.    {
  5.       randMode = random(3) + 1;
  6.       switch(randMode)
  7.       {
  8.          case 1:
  9.             _root.dragOn = 0;
  10.             _root.holdIt = 0;
  11.             break;
  12.          case 2:
  13.             _root.dragOn = 1;
  14.             _root.holdIt = 0;
  15.             break;
  16.          case 3:
  17.             _root.dragOn = 0;
  18.             _root.holdIt = 1;
  19.       }
  20.    }
  21.    _root.musicPlay += 1;
  22.    _root.enemyOut2 = 0;
  23.    _root.level += 1;
  24.    _root.enemyOut = 0;
  25.    _root.moMoney += Math.ceil((random(23) + 10) * _root.hardining);
  26.    _root.moSpeed += 0.03;
  27.    otherDelay = 0;
  28.    if(_root.moSpeed > 3)
  29.    {
  30.       _root.moSpeed = 3;
  31.    }
  32.    _root.moEnemys += random(2) + 1 + Math.ceil(_root.hardining);
  33.    if(_root.enemyLim != "No Limit")
  34.    {
  35.       if(_root.moEnemys > _root.enemyLim)
  36.       {
  37.          _root.moEnemys = _root.enemyLim;
  38.       }
  39.    }
  40.    _root.enemoGen.enemiesGenerated = 0;
  41.    if(_root.battleMusicOn == true && _root.bossMusicOn == true || _root.musicPlay == 4)
  42.    {
  43.       stopAllSounds();
  44.       _root.musicPlay = 0;
  45.       _root.bossMusicOn = false;
  46.       musPlayo = random(4) + 1;
  47.       switch(musPlayo)
  48.       {
  49.          case 1:
  50.             _root.sound.attachSound("battleMusic");
  51.             break;
  52.          case 2:
  53.             _root.sound.attachSound("fight1");
  54.             break;
  55.          case 3:
  56.             _root.sound.attachSound("fight2");
  57.             break;
  58.          case 4:
  59.             _root.sound.attachSound("fight3");
  60.       }
  61.       _root.sound.start(0,60000);
  62.    }
  63.    _root.deadEnemy = 0;
  64.    if(_root.level % _root.bossLev == 0)
  65.    {
  66.       if(_root.battleMusicOn != false)
  67.       {
  68.          stopAllSounds();
  69.          _root.sound.attachSound("bossMusic");
  70.          _root.sound.start(0,60000);
  71.          _root.bossMusicOn = true;
  72.       }
  73.       _root.bossO.play();
  74.    }
  75.    this._visible = false;
  76. }
  77.